// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef MYAPPRENDERER_H
#define MYAPPRENDERER_H
#pragma once

#include "src/shared/renderer/client_app_renderer.h"
#include "MyAppHandlerer.h"


namespace client {

	// Handle bindings in the render process.
	class RenderDelegate : public ClientAppRenderer::Delegate {
	public:
		RenderDelegate();

		virtual void OnContextCreated(CefRefPtr<ClientAppRenderer> app,
			CefRefPtr<CefBrowser> browser,
			CefRefPtr<CefFrame> frame,
			CefRefPtr<CefV8Context> context) OVERRIDE;

		virtual bool OnProcessMessageReceived(
            CefRefPtr<ClientAppRenderer> app,
            CefRefPtr<CefBrowser> browser,
            CefRefPtr<CefFrame> frame,
            CefProcessId source_process,
            CefRefPtr<CefProcessMessage> message)  OVERRIDE;
	private:
		CefRefPtr<V8Handler> m_v8Handler;

		IMPLEMENT_REFCOUNTING(RenderDelegate);
	};

}  // namespace client

#endif  // MYAPPRENDERER_H
